"""
参考：
    https://dormousehole.readthedocs.io/en/latest/
    https://dormousehole.readthedocs.io/en/latest/quickstart.html
    https://dormousehole.readthedocs.io/en/latest/tutorial/index.html
    https://dormousehole.readthedocs.io/en/latest/patterns/index.html
"""

def loadConfig(app):
    import os
    env = os.environ.get("Environment", "development")
    if env == "development" :
        import config.development
    else:
        import config.production

from flask import Flask
app = Flask(__name__)
loadConfig(app)        #加载配置。
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy(app)


